package com.luych.toolbox.data.service.dao;

import com.luych.toolbox.data.service.entity.DataProject;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.Optional;

public interface DataProjectDao extends JpaRepository<DataProject, String>, JpaSpecificationExecutor<DataProject> {

    Optional<DataProject> findByName(String name);

    Page<DataProject> findByNameLike(String name, Pageable pageable);

}